# my_list = [21,25,21,23,22,20]
# index = 0
# while index < len(my_list):
#     print(my_list[index])
#     index += 1
# print("----------------------------------")
# for x in my_list:
#     print(x)

# 取出列表的奇数和偶数插入到新列表中
my_list1 = [1,2,3,4,5,6,7,8,9,10]
my_list_1 = []
my_list_2 = []
for ele in my_list1:
    if (ele % 2) == 0:
        my_list_2.append(ele)
index = 0
while index < len(my_list1):
    ele = my_list1[index]
    if (ele % 2) == 1:
        my_list_1.append(ele)
    index += 1
print(my_list_1)
print(my_list_2)

